﻿@{
    ViewBag.Title = "收货人管理";
    Layout = "~/Areas/Shared/_spList.cshtml";
    ViewBag.ListActionURL = Url.Action("ConsigneeList", "BaseDataManage", new { area = "Hiner" });
    ViewBag.AddActionURL = Url.Action("AddConsignee", "BaseDataManage", new { area = "Hiner" });
    ViewBag.DelActionURL = Url.Action("DelConsignee", "BaseDataManage", new { area = "Hiner" });
    ViewBag.EditActionURL = Url.Action("EditConsignee", "BaseDataManage", new { area = "Hiner" });
    ViewBag.IdColumn = "ConsigneeId";
    ViewBag.NameColumn = "ConsigneeName";
    ViewBag.ListSortName = "";
    ViewBag.ListSortOrder = "";
    ViewBag.AddWindowTitle = "添加收货人";
    ViewBag.EditWindowTitle = "编辑收货人";   
}
@section Script
{
    <script type="text/javascript">
        config.GridOption.columns = [[
            { field: 'ConsigneeName', title: '名称', width: 60, sortable: true },
            { field: 'ConsigneeCode', title: '代码', width: 60, sortable: true },
            { field: 'ConsigneeAddress', title: '地址', width: 60, sortable: true },
            { field: 'ConsigneeTel', title: '联系电话', width: 60, sortable: true },
            { field: 'ConsigneeFax', title: '传真', width: 60, sortable: true }
        ]];

        function SearchOK() {
            var ConsigneeCode = $("#ConsigneeCodeSearch").val();
            var ConsigneeName = $("#ConsigneeNameSearch").val();
            searchWin.window('close');
            grid.datagrid({ url: config.ListActionURL, queryParams: { ConsigneeCode: ConsigneeCode, ConsigneeName: ConsigneeName} });
        }
    </script>
}
@model Kaiser.Modules.Hiner.Models.Consignee.ConsigneeBase
<div id="Dlg-CategoryTree" style="width: 350px; height: 220px;">
    <ul class="easyui-tree" id="SelectCategoryTree">
    </ul>
</div>
<div id="Dlg-Edit" title="编辑" style="width: 500px; height: 320px;" buttons="#buttons">
    <div style="padding: 10px 20px 40px 40px;">
        <form method="post" id="Form1">
        <table>
            <tr>
                <td class="itemtxt" style="text-align: right">
                    姓名：
                </td>
                <td>
                    @Html.HiddenFor(m => Model.ConsigneeId)
                    @Html.TextBoxFor(m => Model.ConsigneeName, new { @Class = "easyui-validatebox", @required = "true", @style = "width: 200px;", @maxlength = "10" })
                </td>
            </tr>
            <tr>
                <td class="itemtxt" style="text-align: right">
                    代码：
                </td>
                <td>
                    @Html.TextBoxFor(m => Model.ConsigneeCode, new { @Class = "easyui-validatebox", @required = "true", @style = "width: 200px;", @maxlength = "10" })
                </td>
            </tr>
            <tr>
                <td style="text-align: right">
                    地址：
                </td>
                <td>
                    @Html.TextBoxFor(m => Model.ConsigneeAddress, new { @Class = "easyui-validatebox", @required = "true", @style = "width: 200px;", @maxlength = "10" })
                </td>
            </tr>
            <tr>
                <td style="text-align: right">
                    联系人电话：
                </td>
                <td>
                    @Html.TextBoxFor(m => Model.ConsigneeTel, new { @Class = "easyui-validatebox", @required = "true", @style = "width: 200px;", @maxlength = "10" })
                </td>
            </tr>
            <tr>
                <td style="text-align: right">
                    传真：
                </td>
                <td>
                    @Html.TextBoxFor(m => Model.ConsigneeFax, new { @Class = "easyui-validatebox", @required = "true", @style = "width: 200px;", @maxlength = "10" })
                </td>
            </tr>
        </table>
        </form>
    </div>
     <div id="search-window" title="搜索" style="width: 500px; height: 290px; padding: 10px 20px">
        <div style="padding: 20px 20px 40px 40px;">
            <form method="post" id="Form2">
            <table>
                  <tr>
                    <td class="itemtxt" style="text-align: right">
                        代码：
                    </td>
                    <td>
                        @Html.TextBox("ConsigneeCodeSearch")
                    </td>
                </tr>
                <tr>
                    <td class="itemtxt" style="text-align: right">
                        姓名：
                    </td>
                    <td>
                        @Html.TextBox("ConsigneeNameSearch")
                    </td>
                </tr>
            </table>
            </form>
        </div>
        <div style="text-align: center; padding: 5px;">
            <a href="javascript:void(0)" onclick="SearchOK()" id="btn-search" icon="icon-ok">确定</a>
            <a href="javascript:void(0)" onclick="closeSearchWindow()" id="btn-search-cancel"
                icon="icon-cancel">取消</a>
        </div>
        </div>
</div>

